<%--                                                                       --%>
<%-- Copyright (c) 2001-2005 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>


<script language="JavaScript">

function confirmCancel(theForm) {
  if ( confirm('<bean:message key="cs.confirm.cancel.microsite"/>') ){
    theForm.action = '<c:url value="/cs/microsite/cancelWizard.do"/>';
    theForm.submit();
  }
}

function clickBack(theForm) {
  theForm.action = '<c:url value="/cs/microsite/participantList.do"/>';
  theForm.submit();
}

function clickFinish(theForm) {
  theForm.submit();
}

</script>

<!-- Zone 5 starts here.  -->

<html:form action="/cs/microsite/msCreate.do">      
<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" 
       summary="microsite wizard summary page">
  <tr>
    <td valign="top">
          
    <!--start title bar here-->
    <div class="pageTitle">
      <bean:message key="ep.wizard.pageTitle" 
                  arg0="${msNewForm.map.currentStep}"/><bean:message key="cs.summary"/>
    </div>
    <!--end title bar here--> 
      <div class="app_pageSubtitle">
	<span class="left">&nbsp;</span>
	<span class="right">&nbsp;</span>
	</div>    
  <div class="blockWrap">
	  <!-- start Page Instructions -->
    <div class="pageInstructions">
      <bean:message key="cs.microsite.create.summary"/>
    </div>

	
	
    <c:if test="${msNewForm.map.logo}">    
      <%-- Only display the microsite icon if user provide one.  --%> 
    <table width="100%">  
        <% String contextPath = request.getContextPath();%>
        <tr>
          <td colspan="2" class="labelField" width="100%">
            <p><span class="label"><bean:message key="cs.microsite.name.logo"/>:</span></p> 
          </td>
        </tr>

        <tr>
          <td width="20%">
            <img src='<%=contextPath%><c:out value="${msNewForm.map.iconPath}"/>' width="150" height="50" border="0" alt="<bean:message key="ep.microsite.logo"/>"/>
          </td>
          <td class="projectName"><c:out value="${msNewForm.map.name}"/></td>
        </tr>
        </table>
     </c:if>

          <%-- Display microsite detail info --%>

    <!--start main content area here-->
    <table class="labelForm" width="100%" border="0" cellspacing="0" 
           cellpadding="0" summary="Microsite Wizard new page">
             
      <tr> 
        <td nowrap width="20%" class="label">
          <bean:message key="cs.microsite.name"/>: 
        </td>
        <td width="80%" nowrap class="labelField"> 
          <c:out value="${msNewForm.map.name}"/>
        </td>
      </tr>
      
      <tr>
        <td nowrap width="20%" class="label">
          <bean:message key="cs.description"/>:</b></td>
        <td width="80%" nowrap class="labelField">
          <c:out value="${msNewForm.map.description}"/>
        </td>
      </tr>
  
      <tr>
        <td nowrap width="20%" class="label">
          <bean:message key="cs.goal"/>:
        </td>
        <td width="80%" nowrap class="labelField">
          <c:out value="${msNewForm.map.goal}" />
        </td>
      </tr>
      
      <tr>
        <td nowrap width="20%" class="label">
          <bean:message key="cs.url"/>:
        </td>
        <td width="80%" nowrap class="labelField">
          <c:out value="${msNewForm.map.urlPath}"/>
        </td>
      </tr>
      
      <tr>
        <td nowrap width="20%" class="label">
          <bean:message key="cs.microsite.logo.image.location"/>:
        </td>
        <td width="80%" align=left colspan=3 class="labelField">
	        <c:out value="${msNewForm.map.iconPath}"/>
        </td>
      </tr>
    </table>
	
          <%--
              <logic:notEqual name="msNewForm" property="showLogo" value="true">
                <p><span class="label"><bean:message key="cs.microsite.name.logo"/>:</span>
                  <br><span class="projectName"><c:out value="${msNewForm.map.name}"/></span>
                </p> 
              </logic:notEqual> 
              --%>
                
        <%-- Only display phase detail if the microsite use phases.  --%>
     <c:if test="${msNewForm.map.usePhase}">
    <br>
      <div class="pageSubsubtitle">
        <span>
          <bean:message key="cs.phases"/>
        </span>
      </div> 

			
      <!-- Begin list phases --> 
          
     <!-- Start List here -->
    <table class="dataTable" border="0" cellspacing="1" cellpadding="2" 
           summary="wizard phase list table" width="100%">
      <tr class="listHeader"> 
        <th id="Name" align="left" width="20%"><bean:message key="cs.name"/></th>
        <th id="Desc" align="left" width="30%"><bean:message key="cs.description"/></th>
        <th id="Goal" align="left" width="30%"><bean:message key="cs.goal"/></th>
      </tr>

      <c:forEach var="onePhase" items="${msNewForm.map.phaseList}" 
                 varStatus = "status" >
          <c:choose>
            <c:when test="${(status.count + 1) % 2 == 0}">
              <tr class="listOdd">
            </c:when> 
            <c:otherwise>
              <tr class="listEven">
            </c:otherwise>
          </c:choose> 

          <td headers="Name" align="left" width="20%"> 
          	<c:out value="${onePhase.map.phaseName}"/>
          </td>
          <td headers="Desc" align="left" width="30%">
          	<c:out value="${onePhase.map.phaseDescription}"/>
          </td>
          <td headers="Goal" align="left" width="30%">
             <c:out value="${onePhase.map.phaseGoal}"/> 
          </td> 
        </tr>   
      </c:forEach>
    </table>
		
    <%-- End phase list table --%>          
    <!-- End list phases --> 
   </c:if>
   
	<br><br>      
        <!-- Begin list participants -->
    <div class="pageSubsubtitle">
        <span class="left">
          <bean:message key="cs.participants"/>
        </span>
    </div> 
    
    <!-- Start List here -->
    <table class="dataTable" border="0" cellspacing="1" cellpadding="2" 
           summary="wizard participant list table" width="100%">
      <tr class="listHeader"> 
        <th id="Name" align="left" width="40%"><bean:message key="cs.name"/></th>
        <th id="Login" align="left" width="20%"><bean:message key="cs.login"/></th>
        <th id="Owner" align="center" width="20%"><bean:message key="cs.owner"/></th>
        <th id="Contact" align="center" width="20%"><bean:message key="cs.participant.contact"/></th>
      </tr>

      <c:forEach var="oneParticipant" items="${msNewForm.map.participantList}" 
                 varStatus = "status" >
          <c:choose>
            <c:when test="${(status.count + 1) % 2 == 0}">
              <tr class="listEven">
            </c:when> 
            <c:otherwise>
              <tr class="listOdd">
            </c:otherwise>
          </c:choose> 
          <td headers="Name" align="left" width="40%"> 
          	<c:out value="${oneParticipant.map.fullName}"/>
          </td>
          <td headers="Login" align="left" width="20%"> 
          	<c:out value="${oneParticipant.map.username}"/>
          </td>
          <td headers="Owner" align="center" width="20%"> 
            <c:if test="${oneParticipant.map.isOwner}">
              <html:img page="/cs/images/icons/cicon_checkmark.gif"/>
            </c:if>
            &nbsp;
          </td>
          <td headers="Contact" align="center" width="20%">
            <c:if test="${oneParticipant.map.isContact}">
              <html:img page="/cs/images/icons/cicon_checkmark.gif"/>
            </c:if>
            &nbsp;
          </td>

       </tr>
     </c:forEach>  
    </table>      
 
   <!-- End list participants --> 
  
      <!--start cancel, back, save bar area here-->
      <div class="pageButtonWrap" align="right">
        <html:button styleClass="pageButton" property="cancelBtn" titleKey="button.cancel" 
                     onclick='return confirmCancel(this.form)'>
          <bean:message key="button.cancel"/>
        </html:button>     
                     
        <html:button styleClass="pageButton" property="backBtn" titleKey="button.back" onclick="return clickBack(this.form)">
          <bean:message key="button.back"/>
        </html:button>
        
        <html:button styleClass="pageButton" property="nextBtn" 
                     titleKey="button.finish"
                     onclick='return clickFinish(this.form);'>
            <bean:message key="button.finish"/>
        </html:button>
  
      </div>         
      </div> <!--end blockWrap-->
      </td>
    </tr>
  </table>

<html:hidden property="templateId" name="msNewForm"/>  
</html:form>


